package ch.bfh.swos.learnaid.model;

import javax.persistence.EntityManager;
import javax.persistence.Persistence;

import org.junit.Test;

public class CreateIT {

	@Test
	public void test() {
		Author author = new Author();
		author.setFirstname("J.R.R");
		author.setLastname("Tolkien");


		EntityManager em = Persistence.createEntityManagerFactory(
				"ch.bfh.swos.learnaid.domain").createEntityManager();

		em.getTransaction().begin();
		em.persist(author);
		em.getTransaction().commit();
	}
}
